package Day34.集合类;

import java.util.ArrayList;

public class ArrayListDemo1 {
    public static void main(String[] args) {
        //使用泛型创建集合类对象
        ArrayList<String> list = new ArrayList<String>();
        list.add("aaa");
        list.add("abc");
        list.add("xyz");
        for (String str:list) {
            System.out.println(str.substring(0,1));
        }


    }
}
